package com.youlai.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.system.common.base.BaseQuery;
import com.youlai.system.model.entity.SysScore;
import com.youlai.system.model.query.ScorePageQuery;
import com.youlai.system.model.query.UserScoreCountPageQuery;
import com.youlai.system.model.vo.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysScoreMapper extends BaseMapper<SysScore> {

    Page<ScorePageVO> getScorePage(Page<ScorePageVO> page, ScorePageQuery queryParams);

    List<ScorePageVO> getScoreListByIdList(List<Long> scoreIdList);

    Page<UserScoreCountPageVO> getUserScoreCountPage(Page<UserScoreCountPageVO> page, UserScoreCountPageQuery queryParams);

    List<UserCourseScoreCountVO> getUserCourseScoreCountList(Long userId);

    List<UserCategoryScoreCountVO> getUserCategoryScoreCountList(Long userId);

    /**
     * 故障分类统计个数
     *
     * @return
     */
    List<CategoryScoreCountVO> getAllCategoryScoreCountList();

    /**
     * 故障科目统计个数
     *
     * @return
     */
    List<CourseScoreCountVO> getAllCourseScoreCountList(BaseQuery query);

    /**
     * 培训地点统计个数
     *
     * @return
     */
    List<LocationScoreCountVO> getAllLocationScoreCountList(BaseQuery query);

    /**
     * 整改措施统计个数
     *
     * @return
     */
    List<MeasureScoreCountVO> getAllMeasureScoreCountList(BaseQuery query);

    /**
     * 问题分类统计个数
     *
     * @return
     */
    List<QuestionScoreCountVO> getAllQuestionScoreCountList(BaseQuery query);
}
